package com.kaisheng.service;

import java.util.List;

import com.kaisheng.dao.InfosDao;
import com.kaisheng.entity.Infos;
import com.kaisheng.util.PKUtil;
import com.kaisheng.util.TimeUtil;

public class InfosService {

	InfosDao idao = new InfosDao();
	public void save(String user_id, String project_id, String mess) {
		Infos info = new Infos();
		info.setId( PKUtil.getId());
		info.setUser_id(user_id);
		info.setProject_id(project_id);
		info.setMessage(mess);
		info.setCreatetime(TimeUtil.getTime());
		
		InfosDao id = new InfosDao();
		id.save(info);
		
	}
	
	public List<Infos> findByProjectId(String project_id) {
		
		return idao.findAll(project_id);
	}
	
	
}
